xen/arm: Rework the interface of p2m_lookup and use typesafe gfn and mfn
authorJulien Grall <julien.grall@arm.com>
Tue, 14 Jun 2016 08:31:00 +0000 (09:31 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 13 Jul 2016 13:08:43 +0000 (14:08 +0100)
commitc2b02d8aa89d69dd1cf54e32a407599e96e6316e
tree12a687d41dc098f70c91263035bdc47db3b1cfc8
parent2fc002bfab19f6584fc09491ad729fc7c08cd5ea
xen/arm: Rework the interface of p2m_lookup and use typesafe gfn and mfn

The prototype and the declaration of p2m_lookup disagree on how the
function should be used. One expect a frame number whilst the other
an address.

Thankfully, everyone is using with an address today. However, most of
the callers have to convert a guest frame to an address. Modify
the interface to take a guest physical frame in parameter and return
a machine frame.

Whilst modifying the interface, use typesafe gfn and mfn for clarity
and catching possible misusage.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/p2m.c
xen/arch/arm/traps.c
xen/include/asm-arm/p2m.h